<?php $this->_extends('../_layouts/default_layout');?>
<?php $this->_block('contents');?>
<link type="text/css" href="<?=Q::ini('custom_system/base_url')?>css/prettyphoto.css" rel="stylesheet" />
<script type="text/javascript" src="<?=Q::ini('custom_system/base_url')?>js/xheditor/xheditor.js"></script>
<script type="text/javascript" src="<?=Q::ini('custom_system/base_url')?>js/jq.prettyphoto.js"></script>
<script type="text/javascript">
$(function(){
	$("a[rel^='pretty_photo']").prettyPhoto({theme: 'facebook'});
	$(".datepicker").datepicker({dateFormat: 'yy-mm-dd', changeMonth: true});
});
</script>
<form action="<?=url('Online::EbayProduct/EditSave')?>" method="post">
<table class="form_table">
	<tr>
		<th>产品编号</th>
		<td><input type="text" value="<?=isset($product_info['number']) ? $product_info['number'] : ''?>" disabled="disabled"/></td>
	</tr>
	<tr>
		<th>产品名称</th>
		<td><input type="text" name="name" size="100" value="<?=isset($product_info['name']) ? htmlspecialchars($product_info['name']) : ''?>" disabled="disabled"/></td>
	</tr>
	<tr>
		<th>产品图片</th>
		<td align="left" valign="middle">
		<?if (isset($product_info['pic_url']) && $product_info['pic_url']):?>
			<?$pretty_photo_number = 0;?>
			<?foreach ($product_info['pic_url'] as $p):?>
			<a rel="pretty_photo[1]" href="<?=$p?>"><?if(!$pretty_photo_number):?><img width="100" src="<?=$p?>" /><?endif;?></a>
			<?$pretty_photo_number = 1;?>
			<?endforeach;?>
		<?endif;?>			
		</td>
	</tr>
	<tr>
		<th>描述语种</th>
		<td>
			<select name="language">
				<option value="">请选择</option>
				<?foreach (Q::ini('custom_flag/online_ebay_product_language') as $l):?>
				<option value="<?=$l['value']?>" <?if ($product_info['language'] && $product_info['language'] == $l['value']):?>selected="selected"<?endif;?>><?=$l['name']?></option>
				<?endforeach;?>
			</select>		
		</td>
	</tr>
	<tr>
		<th>标题名称</th>
		<td><input type="text" name="title" size="100" value="<?=isset($product_info['title']) ? $product_info['title'] : ''?>"/></td>
	</tr>
	<tr>
		<th>产品描述</th>
		<td>
			<textarea rows="10" cols="110" class="xheditor {tools: 'Blocktag, Fontface, FontSize, Bold, Italic, Underline, Strikethrough, FontColor, BackColor, Removeformat, Align, List, Outdent, Indent, Link, Unlink, Img, Flash, Table, Source, Fullscreen')" name="description">
				<?=isset($product_info['description']) ? $product_info['description'] : ''?>
			</textarea>
		</td>
	</tr>
	<tr>
		<th></th>
		<td><input type="hidden" name="id" value="<?=isset($product_info['id']) ? $product_info['id'] : '';?>" /><input type="submit" class="button" value="保存"/></td>
	</tr>
</table>
</form>
<?php $this->_endblock();?>